import React from 'react'
import type{ScrollCardProps} from "@/hooks/useBackTop"
import scrollImg from "@/assets/image/scroll.png"
import style from "./BackTop.module.scss"
export default function BackTop(props: Pick< ScrollCardProps,'scrollTop'|'isScroll'>):React.ReactElement {
  return (
    <div className={`${props.isScroll?style['is-scroll']:style['is-hidden']} ${style['scroll-card']}`}>
    <img
      src={scrollImg}
      className={style['scroll-img']}
      alt=''
      onClick={()=>props.scrollTop()}
    />
  </div>
  )
}
